<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>查看好友</title>
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--<meta name="format-detection" content="telephone = no" />-->
    <!-- Add to homescreen for Chrome on Android -->
    <meta name="mobile-web-app-capable" content="yes">
    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="查看好友" />
    <meta name="msapplication-TileColor" content="#090a0a">
    <link rel="stylesheet" href="__ROOT__/static/home/css/css_style.css">
    <script src="__ROOT__/static/home/css/userInfo/layer.mobile-v2.0/layer_mobile/layer.js"></script>
    <script src="__ROOT__/static/home/js/jquery-1.11.1.min.js"></script>
    <link href="__ROOT__/static/home/css/userInfo/layer.mobile-v2.0/layer_mobile/need/layer.css" rel="stylesheet"/>
    <link href="__ROOT__/static/home/css/userInfo/css/mui.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="__ROOT__/static/home/css/userInfo/css/style.css" />
    <link rel="stylesheet" href="__ROOT__/static/home/css/userInfo/css/top_nav.css" />
</head>
<script>
    //删除好友
    $(function(){
        $('.del').click(function(){
            var params={}
            params.friendId=$('.friendId').val();
            layer.open({
                content: '您确定要删除吗？'
                ,btn: ['确定', '取消']
                ,yes: function(index){
                    $.ajax({

                                cache:true,
                                type:'POST',
                                url:"{:url('home/Userinfo/delFriend')}" ,
                                data: params,
                                async:false,
                                success:function(data){
                                    if(data==1){
                                        layer.open({
                                            content: '删除成功'
                                            ,skin: 'msg'
                                            ,time: 2 //2秒后自动关闭
                                        });
                                        window.location.href="{:url('home/Userinfo/friends')}";
                                    }else{
                                        layer.open({
                                            content: '删除失败'
                                            ,skin: 'msg'
                                            ,time: 2 //2秒后自动关闭
                                        });
                                    }
                                }

                            }
                    )
                }
            });

        });
    });
</script>

<body>
<div style="height: 50px;background-color: powderblue;">
    <div class="top_nav" style=""><a href="{:url('home/Userinfo/friends')}">< 返回</a></div>
    <div class="top_navC">好友资料</div>
    <div class="top_nav" id="save"></div>
</div>
<div class="uset-center-content">
    <a href="###">
        <dl style="height:100px;line-height: 100px;">
            <dt>
                <p style="padding-top: 25px">
                    <img style="width: 50px;height: 50px;" src="__ROOT__/{if condition="!empty($friend['avatar_url'])"}{$friend['avatar_url']}{else /}static/home/css/userInfo/images/default_user_portrait_0.png{/if}">
        </p>    </p>
            </dt>
            <p>&emsp; &emsp;昵称: &emsp;{$friend['nickname']}
                &emsp; &emsp;账号: &emsp;{$friend['user_name']}
            </p>

        </dl>
    </a>
</div>
<div class="uset-center-content" style="text-align: center;height: 50px;line-height: 50px">
    <a href="{:url('home/Userinfo/chat',array('friendId'=>$friend['id']))}">

        <p style="font-size: 15px;background-color:#32CD32;color:#E0FFFF;">
            发消息
        </p>
    </a>
</div>
<div class="uset-center-content"  style="text-align: center;height: 50px;line-height: 50px">
    <a href="###" class="del">
           <p style="font-size: 15px;background-color: #DC143C;color:#E0FFFF;">
               <input type="hidden" value="{$friend['id']}" class="friendId">
            删除好友
           </p>
    </a>
</div>
</body>
</html>
